<?php
//declare(ticks=1);
//
//pcntl_signal_dispatch(SIGCHLD,function (){
//   file_put_contents("signal.txt","signal recevied\n");
//});
//sleep(30);


$event_base = new EventBase();
$event =new Event($event_base,SIGINT,Event::SIGNAL,function ()use(&$event_base){
    file_put_contents("signal2.txt","signal recevied\n");
});
$event->add();
$event_base->loop();